<me:UITMKRF x:Class="WPFExcelReport.TPRMF03"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
                    xmlns:DR="clr-namespace:WPFExcelReport;assembly=TDRAUFTR"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UITMKRF.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UITMKRF.Resources>
    <DockPanel>
        <StackPanel  DockPanel.Dock="Top" >
            <WrapPanel> 
              
                <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=工序}}" />
                <TextBox Background="White" BorderBrush="Black"    Width="20" Margin="1,0,0,0" Text="{Binding KSTKRS,ElementName=TV}" />
                <TextBox Background="White"  BorderBrush="Black"   Width="60" Margin="1,0,0,0" Text="{Binding  KST,ElementName=TV}" />
                <TextBox  Background="White"  BorderBrush="Black"  Width="30"   Margin="1,0,0,0" Text="{Binding  AMTYP,ElementName=TV}" />
                <TextBox  Background="White"  BorderBrush="Black"  Width="30"   Margin="1,0,0,0" Text="{Binding  AGANG,ElementName=TV}" />
                <Button Grid.Column="1" Height="20"  Width="24" Margin="0,0,0,0"  Click="QueryCommand">
                    <Button.Background>
                        <ImageBrush ImageSource="/ImagePackage;component/Images/Search.png" />

                    </Button.Background>
                </Button>
                <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=日期至}}" />
                <TextBox  Background="White"  BorderBrush="Black"  Width="80"   Margin="1,0,0,0" Name="txtDate" /> 
                <Grid Margin="10,0,0,0" VerticalAlignment="Top">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <DR:TDRAUFTR  Grid.Column="0" Name="cDR" DocType="{Binding PRTYPE,ElementName=TV}"
                                  Visibility="Collapsed" 
                                  PrintType="OpenExcel" />
                    <Button  Grid.Column="1"   Click="btnPrint_Click" Height="20" Margin="5,0,0,0" Width="Auto" 
                             Content="{Binding Source={Localization:Translate Word=打印}}" />
                </Grid>
             </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"
                   Grid.Column="0" Grid.ColumnSpan="4"
                          CanUserReorderColumns="True"  
                          FontSize="12"
                          CanUserResizeRows="True" CanUserSortColumns="True"                  
                          AutoGenerateColumns="False"   
                          EnableRowVirtualization="True"  
                          RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                          IsSynchronizedWithCurrentItem="True"  Visibility="Visible"
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                   x:Name="dlgMaster" 
                      
                  >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=SPCONFIRM, Converter={StaticResource ResourceKey=Trim}}" Header="{Binding Source={Localization:TranslateExtension Word=确认}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABKKDAUFTNR}" Header="{Binding Source={Localization:TranslateExtension Word=任务书}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="{Binding Source={Localization:TranslateExtension Word=品种}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="{Binding Source={Localization:TranslateExtension Word=色号}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=生产单}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS, Converter={StaticResource ResourceKey=pnum}}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=步骤}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAGANG}" Header="{Binding Source={Localization:TranslateExtension Word=操作}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=JP05}" Header="{Binding Source={Localization:TranslateExtension Word=数量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFSOLLSTART}" Header="{Binding Source={Localization:TranslateExtension Word=计划开始}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFSOLLDAT}" Header="{Binding Source={Localization:TranslateExtension Word=完成}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFBNRKRS}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFBLFDNR, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=排产机台}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFBPOS, Converter={StaticResource ResourceKey=pnum}}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MKFPLDATV}" Header="{Binding Source={Localization:TranslateExtension Word=排产开始}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MKFPLTIME}" Header="{Binding Source={Localization:TranslateExtension Word=时间}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=MKFSCHICHTV}" Header="{Binding Source={Localization:TranslateExtension Word=班次}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMASCHZT, Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:TranslateExtension Word=加工时间}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMNRKRS}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMLFDNR, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=加工机台}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMPOS, Converter={StaticResource ResourceKey=pnum}}" Header=" "  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </DockPanel>
</me:UITMKRF> 
 
